package com.wpp;

/*
 * jdk5.0出现的 枚举类型
 * 省略了public static final
 *
 *
 *
 *
 *
 * */
public class EnumClassTest {
    public static void main(String args[]) {
        EnumTests1 E = EnumTests1.SPRING;
        EnumTests1 E1 = EnumTests1.WINTER;
        System.out.println(E);
        System.out.println(E.getClass().getSuperclass());

    }
}

enum EnumTests1 {


    SPRING("春天", "春暖花开"),
    SUMMER("夏天", "热"),
    AUTIMU("秋天", "秋"),
    WINTER("冬天", "冷");

    //1.声明属性
    private final String jj;
    private final String gg;

    //2.构造器赋值
    private EnumTests1(String jj, String gg) {
        this.jj = jj;
        this.gg = gg;
    }
    //3.提供当前枚举类的多个对象


    public String getJj() {
        return jj;
    }

    public String getGg() {
        return gg;
    }

//    @Override
//    public String toString() {
//        return "EnumTests{" +
//                "jj='" + jj + '\'' +
//                ", gg='" + gg + '\'' +
//                '}';
//    }
}